chore: organize ts types, fix eslint errors

This commit is contained in:
Vasily Zubarev
2025-04-09 12:45:56 +02:00
parent 707a030a0a
commit 416c45d08c
29 changed files with 277 additions and 84 deletions

View File

@@ -1,5 +1,6 @@
"use server"
import { ActionState } from "@/lib/actions"
import OpenAI from "openai"
import { AnalyzeAttachment } from "./attachments"
@@ -8,7 +9,7 @@ export async function analyzeTransaction(
schema: Record<string, unknown>,
attachments: AnalyzeAttachment[],
apiKey: string
): Promise<{ success: boolean; data?: Record<string, any>; error?: string }> {
): Promise<ActionState<Record<string, string>>> {
const openai = new OpenAI({
apiKey,
})