Files
cal.diy/packages/trpc/server/routers/viewer/calVideo/getMeetingInformation.handler.ts
T
eb66fbe054 feat: add Video Options dropdown with meeting session details (#22147)
* feat: add Video Options dropdown with meeting session details

- Add Video Options dropdown to BookingListItem for Daily video bookings
- Move recording actions from TableActions to new dropdown
- Add meeting session details feature with participant info, join times, duration
- Create new tRPC endpoint for fetching Daily.co meeting information
- Add getMeetingInformation method to VideoApiAdapter
- Create MeetingSessionDetailsDialog component following ViewRecordingsDialog pattern
- Add translation strings for new UI elements
- Update VideoApiAdapter TypeScript interface

Co-Authored-By: [email protected] <[email protected]>

* fix: bugs and types

* Update packages/app-store/dailyvideo/lib/VideoApiAdapter.ts

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* Update packages/app-store/dailyvideo/lib/VideoApiAdapter.ts

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-07-04 01:47:48 +05:30

34 lines
1002 B
TypeScript

import DailyVideoApiAdapter from "@calcom/app-store/dailyvideo/lib/VideoApiAdapter";
import type { TrpcSessionUser } from "@calcom/trpc/server/types";
import { TRPCError } from "@trpc/server";
import type { TGetMeetingInformationInputSchema } from "./getMeetingInformation.schema";
type GetMeetingInformationOptions = {
ctx: {
user: NonNullable<TrpcSessionUser>;
};
input: TGetMeetingInformationInputSchema;
};
export const getMeetingInformationHandler = async ({ ctx: _ctx, input }: GetMeetingInformationOptions) => {
const { roomName } = input;
try {
const videoApiAdapter = DailyVideoApiAdapter();
if (!videoApiAdapter || !videoApiAdapter.getMeetingInformation) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Meeting information feature not available",
});
}
const res = await videoApiAdapter.getMeetingInformation(roomName);
return res;
} catch (err) {
throw new TRPCError({
code: "BAD_REQUEST",
});
}
};