import { getCurrentMerchant } from '@tempi/auth'; import API from './request'; export const formConfigApi = { getListForm: async (params: { formIds?: string }) => { return API.builderBffClient .get('/v1/forms', { params }) .then((res) => res.data?.data?.forms || []); }, upsertForm: async (body: any) => { return API.builderBffClient.post('/v1/forms', body).then((res) => res.data); }, deleteFormById: async (formId: number) => { const merchantId = getCurrentMerchant(); return API.builderBffClient.delete(`/v1/forms/${formId}`, { headers: { 'x-merchant-id': merchantId?.toString() }, }); }, };