feat: Check and compare the DSL version before import an app (#10969)

Co-authored-by: Yi <yxiaoisme@gmail.com>
This commit is contained in:
-LAN-
2024-11-22 15:05:04 +08:00
committed by GitHub
parent d9579f418d
commit 5172f0bf39
24 changed files with 1101 additions and 874 deletions

View File

@@ -58,6 +58,18 @@ export type SiteConfig = {
prompt_public: boolean
} */
export enum DSLImportMode {
YAML_CONTENT = 'yaml-content',
YAML_URL = 'yaml-url',
}
export enum DSLImportStatus {
COMPLETED = 'completed',
COMPLETED_WITH_WARNINGS = 'completed-with-warnings',
PENDING = 'pending',
FAILED = 'failed',
}
export type AppListResponse = {
data: App[]
has_more: boolean
@@ -67,6 +79,16 @@ export type AppListResponse = {
}
export type AppDetailResponse = App
export type DSLImportResponse = {
id: string
status: DSLImportStatus
app_id?: string
current_dsl_version?: string
imported_dsl_version?: string
error: string
}
export type AppSSOResponse = { enabled: AppSSO['enable_sso'] }
export type AppTemplatesResponse = {