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:
Darko Gjorgjijoski
2026-08-05 12:15:29 +02:00
committed by GitHub
parent 8579e4f85f
commit a34bf0909f
27 changed files with 1251 additions and 82 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ export type { CreateTaxTypePayload } from './tax-type.service'
export type { CustomFieldListParams, CreateCustomFieldPayload } from './custom-field.service'
export type { CreateNotePayload } from './note.service'
export type { CreateExchangeRateProviderPayload, BulkUpdatePayload, ExchangeRateResponse, ActiveProviderResponse } from './exchange-rate.service'
export type { Module, ModuleInstallPayload } from './module.service'
export type { Module, ModuleInstallPayload, ModuleUninstallPayload } from './module.service'
export type { Backup, BackupListResponse, CreateBackupPayload, DeleteBackupParams } from './backup.service'
export type { MailConfig, CompanyMailConfig, MailDriver, TestMailPayload } from '@/scripts/types/mail-config'
export type { PdfConfig, PdfConfigResponse, PdfDriver, DomPdfConfig, GotenbergConfig } from './pdf.service'
@@ -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
},
}