'use server'; import { z } from 'zod'; import { AppcondaException } from '../../client'; import { getSDKForCurrentUser } from '../../getSDKForCurrentUser'; import { SendMailSchema } from './schema'; export const SendMail = async (parsedInput: z.infer) => { try { const { mail } = await getSDKForCurrentUser(); //@ts-ignore const app = await mail.SendMail(parsedInput); return app; } catch (error) { if (error instanceof AppcondaException) { throw new Error(error.message); } throw error; } };