import { getDefaultClient } from '../../factory' import type { EntityPrintTemplatesCreateReqVO, EntityPrintTemplatesCreateRespVO, EntityPrintTemplatesDeleteRespVO, EntityPrintTemplatesGetRespVO, EntityPrintTemplatesListRespVO, EntityPrintTemplatesUpdateReqVO, EntityPrintTemplatesUpdateRespVO } from '../../types/entity' // @endpoint POST /apps/:app_id/entity/:entity_id/print-templates // @controller Entity.PrintTemplatesCreate export async function createEntityPrintTemplate( appId: string, entityId: string, data: EntityPrintTemplatesCreateReqVO ): Promise { return getDefaultClient().post(`/apps/${appId}/entity/${entityId}/print-templates`, data) } // @endpoint DELETE /apps/:app_id/entity/:entity_id/print-templates/:id // @controller Entity.PrintTemplatesDelete export async function deleteEntityPrintTemplate( appId: string, entityId: string, id: string ): Promise { return getDefaultClient().delete(`/apps/${appId}/entity/${entityId}/print-templates/${id}`) } // @endpoint GET /apps/:app_id/entity/:entity_id/print-templates/:id // @controller Entity.PrintTemplatesGet export async function getEntityPrintTemplate( appId: string, entityId: string, id: string ): Promise { return getDefaultClient().get(`/apps/${appId}/entity/${entityId}/print-templates/${id}`) } // @endpoint GET /apps/:app_id/entity/:entity_id/print-templates // @controller Entity.PrintTemplatesList export async function getEntityPrintTemplateList( appId: string, entityId: string ): Promise { return getDefaultClient().get(`/apps/${appId}/entity/${entityId}/print-templates`) } // @endpoint PUT /apps/:app_id/entity/:entity_id/print-templates/:id // @controller Entity.PrintTemplatesUpdate export async function updateEntityPrintTemplate( appId: string, entityId: string, id: string, data: EntityPrintTemplatesUpdateReqVO ): Promise { return getDefaultClient().put(`/apps/${appId}/entity/${entityId}/print-templates/${id}`, data) }