Export DSL from history (#24939)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
GuanMu
2025-09-02 21:36:52 +08:00
committed by GitHub
parent 8fcc864fb7
commit 25a11bfafc
9 changed files with 119 additions and 13 deletions

View File

@@ -35,8 +35,13 @@ export const copyApp: Fetcher<AppDetailResponse, { appID: string; name: string;
return post<AppDetailResponse>(`apps/${appID}/copy`, { body: { name, icon_type, icon, icon_background, mode, description } })
}
export const exportAppConfig: Fetcher<{ data: string }, { appID: string; include?: boolean }> = ({ appID, include = false }) => {
return get<{ data: string }>(`apps/${appID}/export?include_secret=${include}`)
export const exportAppConfig: Fetcher<{ data: string }, { appID: string; include?: boolean; workflowID?: string }> = ({ appID, include = false, workflowID }) => {
const params = new URLSearchParams({
include_secret: include.toString(),
})
if (workflowID)
params.append('workflow_id', workflowID)
return get<{ data: string }>(`apps/${appID}/export?${params.toString()}`)
}
// TODO: delete