Scheduling infrastructure for absolutely everyone.
feat: expose AvailabilitySettingsProps type in @calcom/atoms (#22246)
devin-ai-integration[bot]d2bbbf3f45c6
diff --git a/.changeset/better-zebras-relate.md b/.changeset/better-zebras-relate.mdnew file mode 100644index 00000000000..46a322d91d7--- /dev/null+++ b/.changeset/better-zebras-relate.md@@ -0,0 +1,5 @@+---+"@calcom/atoms": minor+---++This change updates the atoms export file to include type for Schedule in Availability Settings atomdiff --git a/packages/platform/atoms/availability/AvailabilitySettings.tsx b/packages/platform/atoms/availability/AvailabilitySettings.tsxindex f46a42fa6ff..7b94c0e4999 100644--- a/packages/platform/atoms/availability/AvailabilitySettings.tsx+++ b/packages/platform/atoms/availability/AvailabilitySettings.tsx@@ -69,19 +69,21 @@ export type CustomClassNames = {export type Availability = Pick<Schedule, "days" | "startTime" | "endTime">;+export type AvailabilitySettingsScheduleType = {+ name: string;+ id: number;+ availability: TimeRange[][];+ isLastSchedule: boolean;+ isDefault: boolean;+ workingHours: WorkingHours[];+ dateOverrides: { ranges: TimeRange[] }[];+ timeZone: string;+ schedule: Availability[];+};+type AvailabilitySettingsProps = {skeletonLabel?: string;- schedule: {- name: string;- id: number;- availability: TimeRange[][];- isLastSchedule: boolean;- isDefault: boolean;- workingHours: WorkingHours[];- dateOverrides: { ranges: TimeRange[] }[];- timeZone: string;- schedule: Availability[];- };+ schedule: AvailabilitySettingsScheduleType;travelSchedules?: RouterOutputs["viewer"]["travelSchedules"]["get"];handleDelete: () => void;allowDelete?: boolean;diff --git a/packages/platform/atoms/availability/wrappers/AvailabilitySettingsPlatformWrapper.tsx b/packages/platform/atoms/availability/wrappers/AvailabilitySettingsPlatformWrapper.tsxindex e6756f9af49..d4c3a9d2c7b 100644--- a/packages/platform/atoms/availability/wrappers/AvailabilitySettingsPlatformWrapper.tsx+++ b/packages/platform/atoms/availability/wrappers/AvailabilitySettingsPlatformWrapper.tsx@@ -15,7 +15,7 @@ import type { CustomClassNames } from "../AvailabilitySettings";import { AvailabilitySettings } from "../AvailabilitySettings";import type { AvailabilityFormValues } from "../types";-type AvailabilitySettingsPlatformWrapperProps = {+export type AvailabilitySettingsPlatformWrapperProps = {id?: string;labels?: {tooltips: Partial<ScheduleLabelsType>;diff --git a/packages/platform/atoms/index.ts b/packages/platform/atoms/index.tsindex 3ff8f90e70b..41409e3a382 100644--- a/packages/platform/atoms/index.ts+++ b/packages/platform/atoms/index.ts@@ -1,6 +1,8 @@export { CalProvider } from "./cal-provider";export { GcalConnect } from "./connect/google/GcalConnect";export { AvailabilitySettingsPlatformWrapper as AvailabilitySettings } from "./availability";+export type { AvailabilitySettingsPlatformWrapperProps as AvailabilitySettingsProps } from "./availability/wrappers/AvailabilitySettingsPlatformWrapper";+export type { AvailabilitySettingsScheduleType } from "./availability/AvailabilitySettings";export { BookerPlatformWrapper as Booker } from "./booker/BookerPlatformWrapper";export { useIsPlatform } from "./hooks/useIsPlatform";export { useAtomsContext } from "./hooks/useAtomsContext";