import { getDefaultClient } from '../../factory'; // @endpoint POST /api/apps/:app_id/entity/:entity_id/print-templates/:template_id/background // @controller Entity.PrintTemplateBackgroundUpload export async function uploadPrintTemplateBackground( appId: string, entityId: string, templateId: string, data: PrintTemplateBackgroundUploadReqVO ): Promise { return getDefaultClient().post(`/apps/${appId}/entity/${entityId}/print-templates/${templateId}/background`, data) } // @endpoint DELETE /api/apps/:app_id/entity/:entity_id/print-templates/:template_id/background // @controller Entity.PrintTemplateBackgroundDelete export async function deletePrintTemplateBackground( appId: string, entityId: string, templateId: string ): Promise { return getDefaultClient().delete(`/apps/${appId}/entity/${entityId}/print-templates/${templateId}/background`) } // Request/Response types export interface PrintTemplateBackgroundUploadReqVO { upload_id: number; filename: string; } export interface PrintTemplateBackgroundUploadRespVO { assets_id: number; file_name: string; file_size: number; content_type: string; full_size_url: string; thumb_url: string; icon_url: string; } export interface PrintTemplateBackgroundDeleteRespVO { success: boolean; message: string; }