mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-02 21:31:01 +00:00
feat(modules): add safe module uninstall lifecycle (#746)
* fix(modules): recover from missing runtime files * feat(modules): add safe uninstall lifecycle * build(deps): lock module SDK 3.2.0 * test(modules): expect SDK 3.2 scaffold constraint
This commit is contained in:
@@ -30,6 +30,11 @@ export interface ModuleInstallPayload {
|
||||
channel?: 'stable' | 'insider'
|
||||
}
|
||||
|
||||
export interface ModuleUninstallPayload {
|
||||
remove_data: boolean
|
||||
confirmation?: string
|
||||
}
|
||||
|
||||
export interface ModuleDetailResponse {
|
||||
data: Module
|
||||
meta: ModuleDetailMeta
|
||||
@@ -80,4 +85,9 @@ export const moduleService = {
|
||||
const { data } = await client.post(API.MODULES_INSTALL, payload)
|
||||
return data
|
||||
},
|
||||
|
||||
async uninstall(module: string, payload: ModuleUninstallPayload): Promise<{ success: boolean; error?: string }> {
|
||||
const { data } = await client.post(`${API.MODULES_UNINSTALL}/${module}/uninstall`, payload)
|
||||
return data
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user