提交新增内容
This commit is contained in:
@@ -1,7 +1,112 @@
|
||||
export interface SplitExcelPayload {
|
||||
paths: string[]
|
||||
selected_columns: string[]
|
||||
split_mode: 'rows_per_file' | 'parts'
|
||||
rows_per_file?: number
|
||||
parts?: number
|
||||
output_dir: string
|
||||
}
|
||||
|
||||
export interface SplitExcelResultItem {
|
||||
source_path: string
|
||||
output_path?: string
|
||||
success: boolean
|
||||
error?: string
|
||||
row_count?: number
|
||||
}
|
||||
|
||||
export interface SplitExcelSummary {
|
||||
total: number
|
||||
success_count: number
|
||||
failed_count: number
|
||||
output_dir?: string
|
||||
}
|
||||
|
||||
export interface SplitExcelResponse {
|
||||
success: boolean
|
||||
summary?: SplitExcelSummary
|
||||
items?: SplitExcelResultItem[]
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface ExcelInfoResponse {
|
||||
success: boolean
|
||||
headers?: string[]
|
||||
total_rows?: number
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface CleanExcelResultItem {
|
||||
source_path: string
|
||||
output_path?: string
|
||||
success: boolean
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface ConvertTxtPayload {
|
||||
paths: string[]
|
||||
output_dir: string
|
||||
template_id: string
|
||||
}
|
||||
|
||||
export interface ConvertTxtTemplateItem {
|
||||
id: string
|
||||
label: string
|
||||
output_filename: string
|
||||
is_default?: boolean
|
||||
built_in?: boolean
|
||||
}
|
||||
|
||||
export interface ConvertTxtResultItem {
|
||||
source_path: string
|
||||
output_path?: string
|
||||
success: boolean
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface ConvertTxtSummary {
|
||||
total: number
|
||||
success_count: number
|
||||
failed_count: number
|
||||
output_dir?: string
|
||||
}
|
||||
|
||||
export interface ConvertTxtResponse {
|
||||
success: boolean
|
||||
summary?: ConvertTxtSummary
|
||||
items?: ConvertTxtResultItem[]
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface CleanExcelSummary {
|
||||
total: number
|
||||
success_count: number
|
||||
failed_count: number
|
||||
output_dir?: string
|
||||
}
|
||||
|
||||
export interface CleanExcelResponse {
|
||||
success: boolean
|
||||
summary?: CleanExcelSummary
|
||||
items?: CleanExcelResultItem[]
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface PywebviewApi {
|
||||
select_brand_xlsx_files?: () => Promise<string[]>
|
||||
select_clean_xlsx_files?: () => Promise<string[]>
|
||||
select_brand_folder?: () => Promise<string | null>
|
||||
select_clean_folder?: () => Promise<string | null>
|
||||
select_folder?: () => Promise<string | null>
|
||||
get_excel_headers?: (filePath: string) => Promise<{ success: boolean; headers?: string[]; error?: string }>
|
||||
get_excel_info?: (filePath: string) => Promise<ExcelInfoResponse>
|
||||
clean_excel_files?: (payload: CleanExcelPayload) => Promise<CleanExcelResponse>
|
||||
split_excel_files?: (payload: SplitExcelPayload) => Promise<SplitExcelResponse>
|
||||
list_txt_templates?: () => Promise<ConvertTxtTemplateItem[]>
|
||||
import_txt_template?: (name?: string) => Promise<{ success: boolean; template?: ConvertTxtTemplateItem; error?: string }>
|
||||
set_default_txt_template?: (templateId: string) => Promise<{ success: boolean; error?: string }>
|
||||
convert_excel_to_uk_txt?: (payload: ConvertTxtPayload) => Promise<ConvertTxtResponse>
|
||||
open_path?: (path: string) => Promise<{ success: boolean; error?: string }>
|
||||
save_template_xlsx?: () => Promise<{ success: boolean; path?: string; error?: string }>
|
||||
save_template_zip?: () => Promise<{ success: boolean; path?: string; error?: string }>
|
||||
save_file_from_url?: (url: string, filename: string) => Promise<{ success: boolean; path?: string; error?: string }>
|
||||
|
||||
Reference in New Issue
Block a user