import { getDefaultClient } from '../../factory' import type { EntityDebugInvokeHookReqVO, EntityDebugInvokeHookRespVO, EntityDeleteEntityRespVO, EntityFieldRecycleRespVO, EntityInfoRespVO, EntitySaveReqVO, EntitySaveRespVO, EntitySaveCustomKeysReqVO, EntitySaveCustomKeysRespVO, EntitySaveNameReqVO, EntitySaveNameRespVO, EntitySerialInitValReqVO, EntitySerialInitValRespVO, EntityUpdateButtonsReqVO, EntityUpdateButtonsRespVO, EntityUpdateOptionsReqVO, EntityUpdateOptionsRespVO, EntityUpdateSuccessScreenReqVO, EntityUpdateSuccessScreenRespVO, EntityUpdateNotificationsReqVO, EntityUpdateNotificationsRespVO, EntityTestNotificationReqVO, EntityTestNotificationRespVO, EntityCloneReqVO, EntityCloneRespVO } from '../../types/entity' // @endpoint POST /apps/:app_id/entity/:entity_id/invoke-debug // @controller Entity.DebugInvokeHook export async function adminInvokeDebugHook( appId: string, entityId: string, data: EntityDebugInvokeHookReqVO ): Promise { return getDefaultClient().post(`/apps/${appId}/entity/${entityId}/invoke-debug`, data) } // @endpoint DELETE /apps/:app_id/entity/:entity_id // @controller Entity.DeleteEntity export async function adminDeleteEntity( appId: string, entityId: string ): Promise { return getDefaultClient().delete(`/apps/${appId}/entity/${entityId}`) } // @endpoint GET /apps/:app_id/entity-recycle // @controller Entity.EntityRecycle export async function adminGetEntityRecycle( appId: string ): Promise { return getDefaultClient().get(`/apps/${appId}/entity-recycle`) } // @endpoint GET /apps/:app_id/entity/:entity_id/restore-fields // @controller Entity.FieldRecycle export async function adminGetFieldRecycle( appId: string, entityId: string ): Promise { return getDefaultClient().get(`/apps/${appId}/entity/${entityId}/restore-fields`) } // @endpoint GET /apps/:app_id/entity/:entity_id // @controller Entity.Info export async function adminGetEntityInfo( appId: string, entityId: string ): Promise { return getDefaultClient().get(`/apps/${appId}/entity/${entityId}`) } // @endpoint PUT /apps/:app_id/entity/:entity_id // @controller Entity.Save export async function adminSaveEntity( appId: string, entityId: string, data: EntitySaveReqVO ): Promise { return getDefaultClient().put(`/apps/${appId}/entity/${entityId}`, data) } // @endpoint PUT /apps/:app_id/entity/:entity_id/custom-keys // @controller Entity.SaveCustomKeys export async function adminSaveEntityCustomKeys( appId: string, entityId: string, data: EntitySaveCustomKeysReqVO ): Promise { return getDefaultClient().put(`/apps/${appId}/entity/${entityId}/custom-keys`, data) } // @endpoint PUT /apps/:app_id/entity/:entity_id/name // @controller Entity.SaveName export async function adminSaveEntityName( appId: string, entityId: string, data: EntitySaveNameReqVO ): Promise { return getDefaultClient().put(`/apps/${appId}/entity/${entityId}/name`, data) } // @endpoint POST /apps/:app_id/entity/:entity_id/serial-initval // @controller Entity.SerialInitVal export async function adminSetSerialInitValue( appId: string, entityId: string, data: EntitySerialInitValReqVO ): Promise { return getDefaultClient().post(`/apps/${appId}/entity/${entityId}/serial-initval`, data) } // @endpoint PUT /apps/:app_id/entity/:entity_id/buttons // @controller Entity.UpdateButtons export async function adminUpdateEntityButtons( appId: string, entityId: string, data: EntityUpdateButtonsReqVO ): Promise { return getDefaultClient().put(`/apps/${appId}/entity/${entityId}/buttons`, data) } // @endpoint PUT /apps/:app_id/entity/:entity_id/options // @controller Entity.UpdateOptions export async function adminUpdateEntityOptions( appId: string, entityId: string, data: EntityUpdateOptionsReqVO ): Promise { return getDefaultClient().put(`/apps/${appId}/entity/${entityId}/options`, data) } // @endpoint PUT /apps/:app_id/entity/:entity_id/success-screen // @controller Entity.UpdateSuccessScreen export async function adminUpdateEntitySuccessScreen( appId: string, entityId: string, data: EntityUpdateSuccessScreenReqVO ): Promise { return getDefaultClient().put(`/apps/${appId}/entity/${entityId}/success-screen`, data) } // @endpoint PUT /apps/:app_id/entity/:entity_id/notifications // @controller Entity.UpdateNotifications export async function adminUpdateEntityNotifications( appId: string, entityId: string, data: EntityUpdateNotificationsReqVO ): Promise { return getDefaultClient().put(`/apps/${appId}/entity/${entityId}/notifications`, data) } // @endpoint POST /apps/:app_id/entity/:entity_id/test-notification // @controller Entity.TestNotification export async function adminTestEntityNotification( appId: string, entityId: string, data: EntityTestNotificationReqVO ): Promise { return getDefaultClient().post(`/apps/${appId}/entity/${entityId}/test-notification`, data) } // @endpoint GET /apps/:app_id/entity/:entity_id/restore-data // @controller Entity.DataRecycle export async function adminGetEntityDataRecycle( appId: string, entityId: string ): Promise { return getDefaultClient().get(`/apps/${appId}/entity/${entityId}/restore-data`) } // @endpoint POST /apps/:app_id/entity/:entity_id/clone // @controller Entity.CloneEntity export async function sendEntityClone( appId: string, entityId: string, data: EntityCloneReqVO ): Promise { return getDefaultClient().post(`/apps/${appId}/entity/${entityId}/clone`, data) }