Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

551 B
Raw Blame
import { type DataExportView } from '@lobechat/types';

import { lambdaClient } from '@/libs/trpc/client';

class ExportService {
  getExportDownloadUrl = async (id: string): Promise<{ fileName: string; url: string }> =>
    lambdaClient.exporter.getExportDownloadUrl.mutate({ id });

  getLatestExport = async (): Promise<DataExportView | null> =>
    lambdaClient.exporter.getLatestExport.query();

  startExport = async (): Promise<DataExportView> => lambdaClient.exporter.startExport.mutate();
}

export const exportService = new ExportService();