2026-08-16 13:25:10 +07:00
|
|
|
import { trpc } from "@/lib/trpc/client";
|
2026-07-26 11:27:21 +07:00
|
|
|
import type { PaginatedRecordings } from "@/lib/types";
|
|
|
|
|
|
|
|
|
|
export const recordingsApi = {
|
|
|
|
|
list: (
|
|
|
|
|
limit?: number,
|
|
|
|
|
channelId?: string,
|
|
|
|
|
userId?: string,
|
|
|
|
|
cursor?: string,
|
2026-08-16 13:25:10 +07:00
|
|
|
) =>
|
|
|
|
|
trpc.recordings.list.query({
|
|
|
|
|
limit,
|
|
|
|
|
channelId,
|
|
|
|
|
userId,
|
|
|
|
|
cursor,
|
|
|
|
|
}) as unknown as Promise<PaginatedRecordings>,
|
2026-07-26 11:27:21 +07:00
|
|
|
|
2026-08-16 13:25:10 +07:00
|
|
|
delete: (id: string) =>
|
|
|
|
|
trpc.recordings.delete.mutate({ id }) as unknown as Promise<{
|
|
|
|
|
ok: boolean;
|
|
|
|
|
}>,
|
2026-07-26 11:27:21 +07:00
|
|
|
};
|